#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
#include "authentifacation.h"

void on_boutton_log_in_pressed(GtkWidget* objet_graphique,gpointer user_data)
{Passe p;
 int n=-2;
 char chemin[]="fichierPasse";
 char Buf[50];
 
 
 GtkWidget *entry1;
 GtkWidget *entry2;
 GtkWidget *label_msg_authentification;
 
GtkWidget* window3;
 
 entry1=lookup_widget(objet_graphique,"entry1");
 entry2=lookup_widget(objet_graphique,"entry2");
 strcpy(p.log_in,gtk_entry_get_text(GTK_ENTRY(entry1)));
 strcpy(p.mot_de_passe,gtk_entry_get_text(GTK_ENTRY(entry2)));
 
 n=verifier_authenti(chemin, p);
 label_msg_authentification=lookup_widget(objet_graphique,"label_msg_authentification");
 if(n==1)
 { sprintf(Buf,"Mot de passe verifiée");
   
 }
 else
 {
 if(n==0)
 {sprintf(Buf,"Mot de passe non verifiée");
 }
 else
 sprintf(Buf,"Impossible d'ouvrire le fichier");
 }
 gtk_label_set_text(GTK_LABEL(label_msg_authentification),Buf);
  if(n==1)
  {window3 = create_window3 ();
   gtk_widget_show (window3);}

}


void on_boutton_changer_mot_de_passe_1_pressed (GtkWidget* Button,gpointer user_data)
{Passe p;
 int n=-2;
 char chemin[]="fichierPasse";
 char Buf[50];
 
 
 GtkWidget *entry1;
 GtkWidget *entry2;
 GtkWidget *label_msg_authentification;
 
 GtkWidget* window2;
 
 entry1=lookup_widget(Button,"entry1");
 entry2=lookup_widget(Button,"entry2");
 strcpy(p.log_in,gtk_entry_get_text(GTK_ENTRY(entry1)));
 strcpy(p.mot_de_passe,gtk_entry_get_text(GTK_ENTRY(entry2)));
 
 n=verifier_authenti(chemin, p);
 label_msg_authentification=lookup_widget(Button,"label_msg_authentification");
 if(n==1)
 { sprintf(Buf,"Mot de passe verifiée");
   
 }
 else
 {
 if(n==0)
 {sprintf(Buf,"Mot de passe non verifiée");
 }
 else
 sprintf(Buf,"Impossible d'ouvrire le fichier");
 }
 gtk_label_set_text(GTK_LABEL(label_msg_authentification),Buf);
  if(n==1)
  {window2 = create_window2 ();
   gtk_widget_show (window2);}

}


void
on_boutton_quitter_window_1_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button4_pressed                     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_boutton_quitter_window_2_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_menu_personnel_pressed       (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_bouton_menu_personnel_pressed       (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button8_pressed                     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_boutton_quitter_window_3_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_ajouter_personnel_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_liste_personnel_pressed      (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_supprimer_personnel_pressed  (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_modifier_personnel_pressed   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_archive_personnel_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_boutton_quitter_window_4_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_enregistrer_personnel_pressed
                                        (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_radiobutton8_pressed                (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_radiobutton7_pressed                (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_radiobutton3_pressed                (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_radiobutton4_pressed                (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_radiobutton5_pressed                (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_radiobutton6_pressed                (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_radiobutton2_pressed                (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_radiobutton1_pressed                (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_checkbutton1_toggled                (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_checkbutton2_activate               (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_button_valider_window_6_pressed     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_quitter_window_6_pressed     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_boutton_quitter_window_7_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_valider_window_8_pressed     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_quitter_window_8_pressed     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_checkbutton3_toggled                (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_checkbutton4_toggled                (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_checkbutton6_toggled                (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_checkbutton5_toggled                (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_checkbutton7_toggled                (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_button_quitter_window_9_pressed     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_supprimer_patient_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_ajouter_patient_pressed      (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_liste_patient_pressed        (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_archive_patient_pressed      (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_enregistrer_patient_pressed  (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_quitter_window_10_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_checkbutton8_toggled                (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_checkbutton9_toggled                (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_button_valider_window_11_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_quitter_window_11_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_valider_window_12_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_modifier_patient_pressed     (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_quitter_window_12_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_checkbutton10_toggled               (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_checkbutton11_toggled               (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_checkbutton12_toggled               (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{

}


void
on_button_quitter_window_13_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_quitter_window_14_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_archive_mouvement_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_afficher_absences_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_grstion__anomalie_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button_afficher_anomalie_pressed    (GtkButton       *button,
                                        gpointer         user_data)
{

}

